import request from '@u/request'

// 请求商品列表
const getItemLists = (params = {}) => request.get('/item/list', {params})
// 新增商品
const addItem = (params = {}) => request.post('/item/add', params)
// 修改商品
const updateItem = (params = {}) => request.put('/item/update', params)
// 删除商品
const delItem = (id: number) => request.delete('/item/delete', {params: {id}})
// 商品详情
const getItemDetail =  (id: string) => request.get(`/item/detail/${id}`)
export {
  getItemLists,
  addItem,
  updateItem,
  delItem,
  getItemDetail
}